﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DQYT.HTDZ.Model;

namespace DQYT.HTDZ.IDAL
{
    public interface IBDRole
    {
        #region  Method

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(int JSE_ID);


        /// <summary>
        /// 增加一条数据
        /// </summary>
        bool Add(BDRoleModel model);
        /// <summary>
        /// 更新一条数据
        /// </summary>
        bool Update(BDRoleModel model);

        /// <summary>
        /// 删除一条数据
        /// </summary>
        bool Delete(int JSE_ID);
        /// <summary>
        /// 批量删除数据
        /// </summary>
        bool DeleteList(string JSE_IDlist);


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        BDRoleModel GetModel(int JSE_ID);

        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetList(string strWhere);

        /// <summary>
        /// 获取记录总数
        /// </summary>
        int GetRecordCount(string strWhere);
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);

        #endregion  Method

        #region 新添加的
        /// <summary>
        /// 获得查询数据
        /// </summary>
        /// <param name="strWhere">查询条件，jiaose j left join userinfo u </param>
        /// <returns>SELECT j.jse_id,j.jse_name,j.jse_description,count(u.use_id) as iNum</returns>
        DataTable GetData(string strWhere);

        /// <summary>
        /// 获得下一个最大值
        /// </summary>
        /// <returns></returns>
        int GetNextID();


        /// <summary>
        /// 获得记录数
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        bool CheckMC(string strWhere);
        #endregion
    }
}
